import { Component } from 'react';
import './ActivityList.scss';
class ActivityList extends Component {
  state = {
    label: [
      '活动名称',
      '城市',
      '开始时间',
      '结束时间',
      '电话',
      '允许电话沟通(1是，0否)',
      '职业',
      '活动类型',
      '赞助商',
      '描述',
    ],
  };
  render() {
    console.log(this);
    return (
      <div className="son-com">
        <ul>
          <h2>填写详情</h2>
          {this.props
            ? Object.keys(this.props).map((key, index) => {
                return (
                  <li key={index}>
                    <span>{this.state.label[index]}：</span>
                    <span>{this.props[key]}</span>
                  </li>
                );
              })
            : ''}
        </ul>
      </div>
    );
  }
}

export default ActivityList;
